/*
 * @file: 状态TAG
 * @author: lengqiux
 * @date: 2024-11-26 10:36:37
 **/
import React from 'react'
import styles from './index.module.less'
import IconFont from '../IconFont'

interface Props {
  icon: string
  bgColor?: string
  textColor?: string
  children?: React.ReactNode | string
}

export default function StateTag({ children, icon, bgColor, textColor }: Props) {
  return (
    <div className={styles.statusWrapper} style={{ backgroundColor: bgColor, color: textColor }}>
      <IconFont className={styles.icon} type={icon}></IconFont>
      {children}
    </div>
  )
}
